<template>
  <div class="detailListWidgetList">
    <!-- 详情信息 -->
    <DetailBox v-if="com=='DetailBox'" :widgetData="widgetData" :mapData="mapData" 
      :comClass="comClass" @detailRecomm="detailRecomm" @deleteItem="deleteItem">
    </DetailBox>
    <!-- 海报位 -->
    <Poster v-if="com=='Poster'" :widgetData="widgetData" :mapData="mapData"
      :comClass="comClass" @detailRecomm="detailRecomm" @deleteItem="deleteItem">
    </Poster>
    <!-- 文字海报 -->
    <Textposter v-if="com=='Textposter'" :widgetData="widgetData" :mapData="mapData"
      :comClass="comClass" @detailRecomm="detailRecomm" @deleteItem="deleteItem">
    </Textposter>
    <!-- 导航栏1 -->
    <NavBox1 v-if="com=='NavBox1'" :widgetData="widgetData" :mapData="mapData"></NavBox1>
    <!-- 导航栏2 -->
    <NavBox2 v-if="com=='NavBox2'" :widgetData="widgetData" :mapData="mapData"></NavBox2>
    <!-- 导航栏3 -->
    <NavBox3 v-if="com=='NavBox3'" :widgetData="widgetData" :mapData="mapData"></NavBox3>
    <!-- 列表页 -->
    <ListBox v-if="com=='ListBox'" :widgetData="widgetData" :mapData="mapData"></ListBox>
  </div>
</template>

<script>
import DetailBox from '@/components/singlePage/model/widgetsList2/detailBox.vue';//详情信息
import Poster from '@/components/singlePage/model/widgetsList2/poster.vue';//海报位
import Textposter from '@/components/singlePage/model/widgetsList2/textposter.vue';//文字海报
import NavBox1 from '@/components/singlePage/model/widgetsList2/navBox1.vue';//导航栏1
import NavBox2 from '@/components/singlePage/model/widgetsList2/navBox2.vue';//导航栏2
import NavBox3 from '@/components/singlePage/model/widgetsList2/navBox3.vue';//导航栏3
import ListBox from '@/components/singlePage/model/widgetsList2/listBox.vue';//列表页

export default {
  name:'detailListWidgetList',
  components: {DetailBox,Poster,Textposter,NavBox1,NavBox2,NavBox3,ListBox},
  props: {
    com: {
      type:String,
      required: true,
    },
    widgetData: {
      type: Object,
      required: true
    },
    comClass:{
      type: null,
      default: null
    },
    // 热力图
    mapData:{
      type: Array,
      default: () => []
    },
  },
  data () {
    return {
      
    }
  },
  computed: {},
  watch: {},
  created () {},
  mounted () {},
  updated () {},
  methods: {
    // 推荐位数据
    detailRecomm(e,items,item,idx){
      this.$emit('detailRecomm',e,items,item,idx)
    },
    // 删除推荐位
    deleteItem(e,items,item,index){
      this.$emit('deleteRecommItem',e,items,item,index)
    }

  },
  filters: {},
}
</script>

<style lang="less" scoped>
.detailListWidgetList {
  width: 100%;
  height: 100%;
}
</style>